<template>
  <section>
  	<!-- <div class="model retrieval">
      <img :src="IMGBASE64.JIANSUOGUANLI2X" class="orange">
      <span class="title">检索管理</span>
      <div class="body">
      	<span>请假类型:</span>
        <select class="select" v-model="typeSelect" :style="{background: `url(${IMGBASE64.SELECT}) no-repeat scroll right center`}">
          <option v-for="(item, key) in typeOption" :label="item" :value="key"></option>
        </select>
        <template class="dataChoose">
          <el-date-picker
            format="yyyy-MM-dd"
            ref="date"
            v-model="value1"
            type="date"
            placeholder="选择日期"
            size="small">
          </el-date-picker>
        </template>
        <el-button type="primary" v-on:click="dataSearch" size="small">确认</el-button>
      </div>
  	</div> -->

		<!-- <div class="model leave">
      <img :src="IMGBASE64.QINGJIAFUDAO2X" class="pink">
	    <span class="title">请假审批</span>
	    <div class="kong"></div>
	    <template>
	    	<el-table :data="tablemsg" style="width: 100%">
	    		<el-table-column prop="id" label="#" width="60" align="center"></el-table-column>
	    		<el-table-column prop="leaveTypestr" label="请假类型" width="90" align="center"></el-table-column>
	    		<el-table-column prop="strarTimestr" label="开始时间" :show-overflow-tooltip='true' align="center"></el-table-column>
	    		<el-table-column prop="endTimestr" label="结束时间" :show-overflow-tooltip='true' align="center"></el-table-column>
	    		<el-table-column prop="parentPhone" label="请假时长" align="center"></el-table-column>
          <el-table-column prop="leaveReason" label="请假理由" :show-overflow-tooltip='true' align="center"></el-table-column>
	    		<el-table-column prop="leaveStatusstr" label="状态" align="center"></el-table-column>
	    		<el-table-column label="操作" width="150" align="center">
	    			<template scope="scope">
	    				<el-button type="text" size="small" v-show="scope.row.yes">同意</el-button>
	    				<el-button type="text" size="small" v-show="scope.row.yes">拒绝</el-button>
	    				<el-button type="text" size="small" v-show="scope.row.no">撤回</el-button>
	    			</template>
	    		</el-table-column>
	    	</el-table>
        <el-pagination
          v-show="paging"
          @current-change="handleCurrentChange"
          :page-size="20"
          layout="prev, pager, next, jumper"
          :total="total"
          class="pull-right">
        </el-pagination>
	    </template>
		</div> -->
  </section>
</template>

<script>
export default {
  data () {
    return {
      leaveType: null,
      typeSelect: null,
      typeOption: [],
      value1: null,
      total: 0,
      page: 1,
      paging: true,
      teacherName: null,
      tchNameArray: [],
      tablemsg: [{
        num: '1',
        name: '欧阳俊逸',
        type: '病假',
        sTime: '2015/09/01 12:00:00',
        eTime: '2015/09/01 12:00:00',
        reason: '请所有老师首次登录系统后',
        phone: '13688888888',
        status: true,
        yes: false,
        no: false
      },
      {
        num: '2',
        name: '欧阳俊逸',
        type: '病假',
        sTime: '2015/09/01 12:00:00',
        eTime: '2015/09/01 12:00:00',
        reason: '请所有老师首次登录系统后',
        phone: '13688888888',
        status: false,
        yes: false,
        no: false
      },
      {
        num: '3',
        name: '欧阳俊逸',
        type: '病假',
        sTime: '2015/09/01 12:00:00',
        eTime: '2015/09/01 12:00:00',
        reason: '请所有老师首次登录系统后',
        phone: '13688888888',
        status: true,
        yes: false,
        no: false
      }]
    }
  }
  // methods: {
  //   dataSearch () {
  //   // time
  //   //   if (this.typeSelect === 0) {
  //   //     this.leaveType = '1'
  //   //   } else if (this.typeSelect === 1) {
  //   //     this.leaveType = '2'
  //   //   }
  //   //   let _cookie = document.cookie.split(';')
  //   //   let _cookieArray = []
  //   //   _cookie.forEach(v => {
  //   //     let _d = v.split('=')
  //   //     _cookieArray.push({
  //   //       key: _d[0],
  //   //       value: _d[1]
  //   //     })
  //   //   })
  //   //   this.$http.post(this._httpUrl + 'student/leave/query', {
  //   //     queryDate: this.$refs.date.displayValue,
  //   //     leaveType: this.leaveType,
  //   //     page: String(this.page),
  //   //     size: '20'
  //   //   }, {'headers': {'yxt-xtoken': _cookieArray[0].value}}).then(function (response) {
  //   //     if (response.body.code === '000') {
  //   //       // console.log(response.data.data)
  //   //       this.tablemsg = response.data.data.content
  //   //     } else {
  //   //       this.$route.push('/login')
  //   //     }
  //   //   })
  //   },
  //   pickerOptions0 () {
  //   // time
  //   //   return time.getTime() < Date.now() - 8.64e7
  //   },
  //   handleCurrentChange () {
  //   // val
  //   //   this.page = val
  //   //   this.getStudentNameData()
  //   }
  // },
  // mounted () {
  //   // let _cookie = document.cookie.split(';')
  //   // let _cookieArray = []
  //   // _cookie.forEach(v => {
  //   //   let _d = v.split('=')
  //   //   _cookieArray.push({
  //   //     key: _d[0],
  //   //     value: _d[1]
  //   //   })
  //   // })
  //   // this.xtoken = {'yxt-xtoken': _cookieArray[0].value}
  //   // this.$http.post(this._httpUrl + 'student/leave/query', {}, {'headers': {'yxt-xtoken': _cookieArray[0].value}}).then(function (response) {
  //   //   if (response.body.code === '000') {
  //   //     // console.log(response.data.data.content)
  //   //     this.tablemsg = response.data.data.content
  //   //     for (var i = 0; i < this.tablemsg.length; i++) {
  //   //       if (this.tablemsg[i].leaveStatusstr === '待审批') {
  //   //         this.tablemsg[i].yes = true
  //   //       } else {
  //   //         this.tablemsg[i].no = true
  //   //       }
  //   //     }
  //   //   }
  //   // })
  //   // this.$http.post(this._httpUrl + 'student/leave/type', {}, {'headers': {'yxt-xtoken': _cookieArray[0].value}}).then(function (response) {
  //   //   if (response.body.code === '000') {
  //   //     this.typeOption = []
  //   //     this.typeOption.push(response.data.data[1])
  //   //     this.typeOption.push(response.data.data[2])
  //   //   } else {
  //   //     this.$route.push('/login')
  //   //   }
  //   // })
  // }
}
</script>

<style lang="less" scoped>
@import '/static/css/all-use.css';
	.retrieval{
	  .body{
	    span{
	    	margin-left: 4%;
	    }
	    span:first-child{
	    	margin-left: 0;
	    }
	    .select{
	      width: 13%;
	      border: 0;
	      border-bottom: 1px solid #D7D7D7;
	      margin-right: 4%;
	    }
	  }
	}

</style>
